

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>5.9. PQR file format — MDAnalysis.coordinates.PQR &mdash; MDAnalysis v0.7.5-devel documentation</title>
    <link rel="stylesheet" href="../../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '0.7.5-devel',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within MDAnalysis v0.7.5-devel documentation"
          href="../../_static/opensearch.xml"/>
    <link rel="shortcut icon" href="../../_static/mdanalysis-logo.ico"/>
    <link rel="top" title="MDAnalysis v0.7.5-devel documentation" href="../../index.html" />
    <link rel="up" title="5. Coordinates modules" href="../coordinates_modules.html" />
    <link rel="next" title="5.10. TRJ/MDCRD file format (Amber) — MDAnalysis.coordinates.TRJ" href="TRJ.html" />
    <link rel="prev" title="5.8. PDBQT structure files in MDAnalysis — MDAnalysis.coordinates.PDBQT" href="PDBQT.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="TRJ.html" title="5.10. TRJ/MDCRD file format (Amber) — MDAnalysis.coordinates.TRJ"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="PDBQT.html" title="5.8. PDBQT structure files in MDAnalysis — MDAnalysis.coordinates.PDBQT"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" accesskey="U">5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../index.html">
              <img class="logo" src="../../_static/mdanalysis-logo-200x150.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="PDBQT.html"
                        title="previous chapter">5.8. PDBQT structure files in MDAnalysis &#8212; <tt class="docutils literal docutils literal docutils literal"><span class="pre">MDAnalysis.coordinates.PDBQT</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="TRJ.html"
                        title="next chapter">5.10. TRJ/MDCRD file format (Amber) &#8212; <tt class="docutils literal"><span class="pre">MDAnalysis.coordinates.TRJ</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/documentation_pages/coordinates/PQR.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <span class="target" id="module-MDAnalysis.coordinates.PQR"></span><div class="section" id="pqr-file-format-mdanalysis-coordinates-pqr">
<h1>5.9. PQR file format &#8212; <a class="reference internal" href="#module-MDAnalysis.coordinates.PQR" title="MDAnalysis.coordinates.PQR"><tt class="xref py py-mod docutils literal"><span class="pre">MDAnalysis.coordinates.PQR</span></tt></a><a class="headerlink" href="#pqr-file-format-mdanalysis-coordinates-pqr" title="Permalink to this headline">¶</a></h1>
<p>Read atoms with charges from a <a class="reference external" href="http://www.poissonboltzmann.org/file-formats/biomolecular-structurw/pqr">PQR</a> file (as written by <a class="reference external" href="http://www.poissonboltzmann.org/pdb2pqr">PDB2PQR</a>). The
following is adopted from the description of the <a class="reference external" href="http://www.poissonboltzmann.org/file-formats/biomolecular-structurw/pqr">PQR</a> format as used by <a class="reference external" href="http://www.poissonboltzmann.org/apbs">APBS</a>:</p>
<p><em>MDAnalysis</em> reads very loosely-formatted PQR files: all fields are
<strong>whitespace-delimited</strong> rather than the strict column formatting mandated
by the <a class="reference external" href="http://www.rcsb.org/pdb/info.html#File_Formats_and_Standards">PDB</a> format. This more liberal formatting allows coordinates
which are larger/smaller than ±999 Å.</p>
<p>MDAnalysis reads data on a per-line basis from PQR files using the following format:</p>
<div class="highlight-python"><pre>recordName serial atomName residueName chainID residueNumber X Y Z charge radius</pre>
</div>
<p>If this fails it is assumed that the <em>chainID</em> was omitted and the shorter
format is read:</p>
<div class="highlight-python"><pre>recordName serial atomName residueName residueNumber X Y Z charge radius</pre>
</div>
<p>Anything else will raise a <tt class="xref py py-exc docutils literal"><span class="pre">ValueError</span></tt>.</p>
<p>The whitespace is the most important feature of this format: fields
<em>must</em> be separated by at least one space or tab character. The fields
are:</p>
<dl class="docutils">
<dt><em>recordName</em></dt>
<dd>A string which specifies the type of PQR entry and should either be ATOM or
HETATM.</dd>
<dt><em>serial</em></dt>
<dd>An integer which provides the atom index (but note that MDAnalysis renumbers
atoms so one cannot rely on the <em>serial</em>)</dd>
<dt><em>atomName</em></dt>
<dd>A string which provides the atom name.</dd>
<dt><em>residueName</em></dt>
<dd>A string which provides the residue name.</dd>
<dt><em>chainID</em></dt>
<dd>An optional string which provides the chain ID of the atom.</dd>
<dt><em>residueNumber</em></dt>
<dd>An integer which provides the residue index.</dd>
<dt><em>X Y Z</em></dt>
<dd>Three floats which provide the atomic coordiantes.</dd>
<dt><em>charge</em></dt>
<dd>A float which provides the atomic charge (in electrons).</dd>
<dt><em>radius</em></dt>
<dd>A float which provides the atomic radius (in Ã…).</dd>
</dl>
<p>Clearly, this format can deviate wildly from <a class="reference external" href="http://www.rcsb.org/pdb/info.html#File_Formats_and_Standards">PDB</a> due to the use of whitespaces
rather than specific column widths and alignments. This deviation can be
particularly significant when large coordinate values are used.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Fields <em>must be white-space separated</em> or data are read
incorrectly. PDB formatted files are <em>not</em> guaranteed to be
white-space separated so extra care should be taken when quickly
converting PDB files into PQR files using simple scripts.</p>
</div>
<p>For example, PQR files created with <a class="reference external" href="http://www.poissonboltzmann.org/pdb2pqr">PDB2PQR</a> and the <cite>&#8211;whitespace</cite>
option are guaranteed to conform to the above format:</p>
<div class="highlight-python"><pre>pdb2pqr --ff=charmm --whitespace 4ake.pdb 4ake.pqr</pre>
</div>
<dl class="class">
<dt id="MDAnalysis.coordinates.PQR.PQRReader">
<em class="property">class </em><tt class="descclassname">MDAnalysis.coordinates.PQR.</tt><tt class="descname">PQRReader</tt><big>(</big><em>filename</em>, <em>convert_units=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.PQR.PQRReader" title="Permalink to this definition">¶</a></dt>
<dd><p>Read a <a class="reference external" href="http://www.poissonboltzmann.org/file-formats/biomolecular-structurw/pqr">PQR</a> file into MDAnalysis.</p>
<p>The <a class="reference internal" href="../topology/PQRParser.html#module-MDAnalysis.topology.PQRParser" title="MDAnalysis.topology.PQRParser"><tt class="xref py py-mod docutils literal"><span class="pre">PQRParser</span></tt></a> takes charges from the
PQR file in order to populate the
<tt class="xref py py-attr docutils literal"><span class="pre">MDAnalysis.core.AtomGroup.Atom.charge</span></tt> attribute. Radii are
accessible through the <a class="reference internal" href="#MDAnalysis.coordinates.PQR.PQRReader.get_radii" title="MDAnalysis.coordinates.PQR.PQRReader.get_radii"><tt class="xref py py-meth docutils literal"><span class="pre">get_radii()</span></tt></a> method of the reader, the
<a class="reference internal" href="../core/AtomGroup.html#MDAnalysis.core.AtomGroup.AtomGroup.radii" title="MDAnalysis.core.AtomGroup.AtomGroup.radii"><tt class="xref py py-meth docutils literal"><span class="pre">MDAnalysis.core.AtomGroup.AtomGroup.radii()</span></tt></a> method and the
<tt class="xref py py-attr docutils literal"><span class="pre">MDAnalysis.core.AtomGroup.Atom.radius</span></tt> attribute.</p>
<p>Read coordinates from <em>filename</em>.</p>
<p><em>filename</em> can be a gzipped or bzip2ed compressed <a class="reference external" href="http://www.poissonboltzmann.org/file-formats/biomolecular-structurw/pqr">PQR</a> file.</p>
<dl class="method">
<dt id="MDAnalysis.coordinates.PQR.PQRReader.get_charges">
<tt class="descname">get_charges</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.PQR.PQRReader.get_charges" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an array of charges in atom order.</p>
</dd></dl>

<dl class="method">
<dt id="MDAnalysis.coordinates.PQR.PQRReader.get_radii">
<tt class="descname">get_radii</tt><big>(</big><big>)</big><a class="headerlink" href="#MDAnalysis.coordinates.PQR.PQRReader.get_radii" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an array of atom radii in atom order.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="TRJ.html" title="5.10. TRJ/MDCRD file format (Amber) — MDAnalysis.coordinates.TRJ"
             >next</a> |</li>
        <li class="right" >
          <a href="PDBQT.html" title="5.8. PDBQT structure files in MDAnalysis — MDAnalysis.coordinates.PDBQT"
             >previous</a> |</li>
        <li><a href="../../index.html">MDAnalysis v0.7.5-devel documentation</a> &raquo;</li>
          <li><a href="../coordinates_modules.html" >5. Coordinates modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2005-2011, Naveen Michaud-Agrawal, Elizabeth J. Denning, Joshua Adelman,
    Christian Beckstein (logo), David Caplan, Jan Domański, Philip Fowler,
    Joseph Goose, Benjamin Hall, Danny Parton, Tyler Reddy, Paul Rigor,
    and Oliver Beckstein.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>